from celery.result import AsyncResult
from celery_tasks.center import cel

async_result = AsyncResult(id="8e05476e-b126-48c2-97b6-211e9df186c9", app=cel)

if async_result.successful():
    result = async_result.get()
    print(result)
elif async_result.failed():
    print('执行失败')
elif async_result.status == "PENDING":
    print('任务等待中被执行')
elif async_result.status == "RETRY":
    print('任务异常后正在重试')
elif async_result.status == "STARTED":
    print('任务已经开始被执行')

